import { Module } from '@nestjs/common'
import { ExamplesController } from './examples.controller'
import { TableService } from './table.service'
import { WorkflowDataService } from './workflowData.service'
import { WorkflowTemplateService } from './workflowTemplate.service'
import { MongooseModule } from '@nestjs/mongoose'
import { Table, TableSchema } from './schemas/table.schema'
import { WorkflowData, WorkflowDataSchema } from './schemas/workflowData.schema'
import {
  WorkflowTemplate,
  WorkflowTemplateSchema
} from './schemas/workflowTemplate.schema'
import { UsersModule } from 'src/users/users.module'

@Module({
  imports: [
    MongooseModule.forFeature([
      { name: Table.name, schema: TableSchema },
      { name: WorkflowData.name, schema: WorkflowDataSchema },
      { name: WorkflowTemplate.name, schema: WorkflowTemplateSchema }
    ]),
    UsersModule
  ],
  controllers: [ExamplesController],
  providers: [TableService, WorkflowDataService, WorkflowTemplateService]
})
export class ExamplesModule {}
